PtInRgn
PtInRgn Check if a specified pixel is enclosed by a region Point thePt ; point identifying the pixel in question returns Is thePt inside of theRgn ?
PtInRgn returns an indication of whether or not a point (actually, the pixel below and to the right of a mathematical coordinate) is enclosed by the outline
of a region.
thePt is a Point, expressed in local or global coordinates. theRgn is the handle of a region, in the same coordinate system as thePt.
Returns: a Boolean value indicating whether the point is inside of the region. It is one of:
Notes: This is useful in determining if a mouse-down event has occurred while
the cursor was positioned in the area of a region. Note that since the
need to convert as follows:
.
:
if (PtInRgn( theEvent.where, theRgn ) { ... /* yes, it was in that region */ ...
}